package com.codinghero.zqlb.async.dao;

import java.sql.SQLException;

import com.codinghero.sql.DBOper;
import com.codinghero.sql.MySQLOper;
import com.codinghero.zqlb.async.ConstantAsync;

public class BaseDao {
	protected DBOper dbOper;
	
	public BaseDao() {
		dbOper = new MySQLOper(ConstantAsync.JDBC_URL, ConstantAsync.USER_ID,
				ConstantAsync.PASSWORD);
	}
	
	public void connect() throws SQLException {
		dbOper.connect();
	}
	
	public void close() {
		dbOper.close();
	}
	
	public void startTransaction() throws SQLException {
		dbOper.startTransaction();
	}
	
	public void commit() throws SQLException {
		dbOper.commit();
	}
	
	public void rollback() {
		dbOper.rollback();
	}
}
